package com.ellricky.baselib.adapter

import com.andr.common.ui.adapter.BaseRecyclerAdapter
import com.andr.common.ui.adapter.SmartViewHolder
import com.ellricky.baselib.R
import com.ellricky.baselib.entity.new.Introduce

class SelectIntroduceAdapter :
    BaseRecyclerAdapter<Introduce>(R.layout.base_adapter_select_introduce) {

    override fun onBindViewHolder(vh: SmartViewHolder, data: Introduce, p2: Int) {
        vh.text(R.id.tvName, data.member_name)
            .text(R.id.tvBaseHour, if (data.basic_num.isEmpty()) "0课时" else "${data.basic_num}课时")
            .text(R.id.tvBirth, data.birthday)
            .text(R.id.tvSpecialHour, if (data.special_num.isEmpty()) "0课时" else "${data.special_num}课时" )
            .text(R.id.tvAge, data.member_age)
    }
}